﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RAD.LightOne.Test.Model
{
    [DBTable("person")]
    public class TestClass1 : MyObject<TestClass1>, IFull<TestClass1>
    {
        [DBField("name")]
        public string Name { get; set; }

        [DBField("age")]
        public int Age { get; set; }

        public IEnumerable<TestClass2> Children()
        {
            return TestClass2.FindByOwner(this);
        }

        #region ISave<TestClass1> Members

        public new void Save()
        {
            base.Save();
        }

        public new void Save(System.Data.IDbTransaction trx)
        {
            base.Save(trx);
        }

        #endregion

        #region ILoad<TestClass1> Members

        public new void Load()
        {
            base.Load();
        }

        public new void Load(System.Data.IDbTransaction trx)
        {
            base.Load(trx);
        }

        #endregion

        #region IDelete<TestClass1> Members

        public new void Delete()
        {
            base.Delete();
        }

        public new void Delete(System.Data.IDbTransaction trx)
        {
            base.Delete(trx);
        }

        #endregion
    }
}
